/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.user.mapstruct;

import com.pig4cloud.pigx.user.entity.UserApiKey;
import com.pig4cloud.pigx.user.vo.AppUserApiKeyDetailVO;
import com.pig4cloud.pigx.user.vo.AppUserApiKeyPageVO;
import com.pig4cloud.pigx.user.vo.UserApiKeyCacheVO;
import com.pig4cloud.pigx.user.vo.UserApiKeyInfoVO;
import com.pig4cloud.pigx.user.vo.UserApiKeyVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * UserApiKeyStruct
 *
 * @since 2022/10/28 17:01
 */
@Mapper
public interface UserApiKeyStruct {

	UserApiKeyStruct INSTANCE = Mappers.getMapper(UserApiKeyStruct.class);

	/**
	 * UserApiKey -> UserApiKeyVO
	 *
	 * @param entity 实体
	 * @return {@link UserApiKeyVO}
	 * @since 2022/10/28 16:28
	 */
	UserApiKeyVO entity2VO(UserApiKey entity);

	/**
	 * List<UserApiKey> -> List<UserApiKeyVO>
	 *
	 * @param list list
	 * @return {@link List<UserApiKeyVO>}
	 * @since 2022/10/28 16:28
	 */
	List<UserApiKeyVO> list2VOList(List<UserApiKey> list);

	/**
	 * List<UserApiKey> -> List<AppUserApiKeyPageVO>
	 *
	 * @param list list
	 * @return {@link List<AppUserApiKeyPageVO>}
	 * @since 2022/10/28 16:28
	 */
	List<AppUserApiKeyPageVO> list2AppPageVOList(List<UserApiKey> list);

	/**
	 * UserApiKey -> AppUserApiKeyDetailVO
	 *
	 * @param entity 实体
	 * @return {@link AppUserApiKeyDetailVO}
	 * @since 2022/10/28 16:28
	 */
	AppUserApiKeyDetailVO entity2AppDetailVO(UserApiKey entity);

	/**
	 * UserApiKey -> UserApiKeyCacheVO
	 *
	 * @param entity 实体
	 * @return {@link UserApiKeyCacheVO}
	 * @since 2022/10/28 16:28
	 */
	UserApiKeyCacheVO entity2CacheVO(UserApiKey entity);

	/**
	 * UserApiKeyCacheVO -> UserApiKeyInfoVO
	 *
	 * @param vo vo
	 * @return {@link UserApiKeyInfoVO}
	 * @since 2022/10/28 16:28
	 */
	UserApiKeyInfoVO cacheVO2InfoVO(UserApiKeyCacheVO vo);
}
